package com.service.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.service.dao.model.MemberBorrow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface MemberBorrowMapper extends BaseMapper<MemberBorrow> {

    /**
     * 获取所有未完成还款的借贷记录
     *
     */
    @Select("select * from hm_member_borrow where borrow_status < 3 and surplus_num > 0 order by apply_time")
    List<MemberBorrow> listNotFinishBorrow();
}